package com.whfc.uni.config;

import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySources;
import com.whfc.common.file.FilePathConfig;
import com.whfc.common.third.bimface.BimFaceProperties;
import com.whfc.common.third.map.MapApi;
import com.whfc.common.third.map.impl.QQMapApi;
import com.whfc.common.third.map.impl.QQMapProperties;
import com.whfc.common.third.tq.TQApi;
import com.whfc.common.third.tq.TqProperties;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author hw
 * @Date 2021-05-19 15:24
 * @Version 1.0
 */
@Configuration
@NacosPropertySources(value = {
        @NacosPropertySource(dataId = "com.whfc.uni.properties", autoRefreshed = true),
        @NacosPropertySource(dataId = "com.whfc.common.properties", autoRefreshed = true)
})
public class UniConfig {


    @Value("${spring.profiles.active}")
    private String profile;

    @Bean("msFilePathConfig")
    public FilePathConfig msFilePathConfig() {
        FilePathConfig config = new FilePathConfig("ms", profile);
        return config;
    }

}
